Carbon


DMExtendedNotificationProcPtr

Header: Displays.h Carbon status: Supported

Defines a pointer to an extended notification callback function.

typedef void(* DMExtendedNotificationProcPtr) (
    void *userData, 
    SInt16 theMessage, 
    void *notifyData
);

You would declare your function like this if you were to name it MyDMExtendedNotificationCallback:

void MyDMExtendedNotificationCallback (
    void *userData, 
    SInt16 theMessage, 
    void *notifyData
);
userData

A pointer you passed into DMRegisterExtendedNotifyProc.

theMessage

A message selector. See “Notification Messagesî for information on specific message selectors.

notifyData

A pointer to message-specific information data provided by the the Display Manager, described in “Notification Messagesî.

function result

DISCUSSION

Display Manager notification functions use this callback function when your application needs to know when certain events have occurred. The system software may implement these events or follow a user action. When these events occur, the Display Manager will send notification messages to registrants.

When you call the function DMRegisterExtendedNotifyProc you designate an application-defined function to handle the extended notification procedure.

When you implement this function, the pointer you pass to the DMRegisterExtendedNotifyProc function should be a universal procedure pointer with the following type definition:

typedef (DMExtendedNotificationProcPtr) DMExtendedNotificationUPP;

To create a universal procedure pointer for your application-defined function, you should use the NewDMExtendedNotificationProc macro as follows:

DMExtendedNotificationUPP MyExtendedNotificationUPP;

MyExtendedNotificationUPP = NewDMExtendedNotificationProc (MyExtendedNotificationProc);

You can then pass MyExtendedNotificationUPP in the notifyProc parameter of the DMRegisterExtendedNotifyProc function. When you no longer need notifications, you should remove it using the DMRemoveExtendedNotifyProc function. You sould also dispose of the UPP using the DisposeDMExtendedNotificationUPP function:

DisposeDMExtendedNotificationUPP(MyExtendedNotificationUPP);

Using this call ensures that the call is made through a universal procedure pointer.

SPECIAL CONSIDERATIONS

Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.

AVAILABILITY

Supported in Carbon.


© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)